FROM openliberty/open-liberty:kernel-java8-openj9-ubi

USER root
COPY ./ /app/Demo_Test/

RUN mv -f /app/Demo_Test/src/main/liberty/config/* /opt/ol/wlp/usr/servers/defaultServer/ \ 
    && mv -f /app/Demo_Test/target/Demo_Test-0.0.1-SNAPSHOT.war /opt/ol/wlp/usr/servers/defaultServer/apps/ \   
    && rm -rf /app/Demo_Test/*

EXPOSE 9443 9080

RUN configure.sh